﻿namespace CKFinder.Connector.CommandHandlers
{
    using CKFinder.Connector;
    using System;

    internal class ErrorCommandHandler : XmlCommandHandlerBase
    {
        private int _ErrorNumber;

        public ErrorCommandHandler()
        {
            this._ErrorNumber = 110;
        }

        public ErrorCommandHandler(ConnectorException connectorException)
        {
            this._ErrorNumber = connectorException.Number;
        }

        protected override void BuildXml()
        {
            ConnectorException.Throw(this._ErrorNumber);
        }

        protected override bool MustCheckRequest()
        {
            return false;
        }

        protected override bool MustIncludeCurrentFolder()
        {
            return false;
        }
    }
}

